package edu.stthomas.seis752.model;

// default package
// Generated Apr 11, 2013 1:36:19 AM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * WallTag generated by hbm2java
 */
@Entity
@Table(name = "wall_tag", catalog = "jibster")
public class WallTag implements java.io.Serializable {

	private Long id;
	private User userBySrcUserId;
	private User userByDestUserId;
	private String text;
	private Date createDate;

	public WallTag() {
	}

	public WallTag(User userBySrcUserId, User userByDestUserId, Date createDate) {
		this.userBySrcUserId = userBySrcUserId;
		this.userByDestUserId = userByDestUserId;
		this.createDate = createDate;
	}

	public WallTag(User userBySrcUserId, User userByDestUserId, String text,
			Date createDate) {
		this.userBySrcUserId = userBySrcUserId;
		this.userByDestUserId = userByDestUserId;
		this.text = text;
		this.createDate = createDate;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "src_user_id", nullable = false)
	public User getUserBySrcUserId() {
		return this.userBySrcUserId;
	}

	public void setUserBySrcUserId(User userBySrcUserId) {
		this.userBySrcUserId = userBySrcUserId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "dest_user_id", nullable = false)
	public User getUserByDestUserId() {
		return this.userByDestUserId;
	}

	public void setUserByDestUserId(User userByDestUserId) {
		this.userByDestUserId = userByDestUserId;
	}

	@Column(name = "text", length = 100)
	public String getText() {
		return this.text;
	}

	public void setText(String text) {
		this.text = text;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_date", nullable = false, length = 0)
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

}
